<template>
  <view>
    <custom-navbar title="我的" :leftIcon="false"></custom-navbar>

    <view class="user-section">
      <image class="bg" src="/static/images/swiper1.png"></image>
      <view class="user-info-box">
        <view class="portrait-box">
          <image
            class="portrait"
            :src="userInfo.portrait || '/static/missing-face.png'"
          ></image>
        </view>
        <view class="info-box">
          <text class="username">{{ userInfo.nickname || "游客" }}</text>
        </view>
      </view>
      <view class="vip-card-box">
        <image class="card-bg" src="/static/vip-card-bg.png" mode=""></image>
        <view class="b-btn"> 立即开通 </view>
        <view class="tit">
          <text class="yticon icon-iLinkapp-"></text>
          DCloud会员
        </view>
        <text class="e-m">DCloud Union</text>
        <text class="e-b">开通会员开发无bug 一测就上线</text>
      </view>
    </view>
  </view>
</template>
<style lang="scss" scoped>
.user-section {
  height: 520upx;
  padding: 100upx 30upx 0;
  position: relative;
  .bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    filter: blur(1px);
    opacity: 0.7;
  }
}
.user-info-box {
  height: 180upx;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  .portrait {
    width: 130upx;
    height: 130upx;
    border: 5upx solid #fff;
    border-radius: 50%;
  }
  .username {
    margin-left: 20upx;
  }
}
.vip-card-box {
  display: flex;
  flex-direction: column;
  color: #f7d680;
  height: 240upx;
  background: linear-gradient(left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
  border-radius: 16upx 16upx 0 0;
  overflow: hidden;
  position: relative;
  padding: 20upx 24upx;
  .card-bg {
    position: absolute;
    top: 20upx;
    right: 0;
    width: 380upx;
    height: 260upx;
  }
  .b-btn {
    position: absolute;
    right: 20upx;
    top: 16upx;
    width: 132upx;
    height: 40upx;
    text-align: center;
    line-height: 40upx;
    font-size: 22upx;
    color: #36343c;
    border-radius: 20px;
    background: linear-gradient(left, #f9e6af, #ffd465);
    z-index: 1;
  }
  .tit {
    color: #f7d680;
    margin-bottom: 28upx;
    .yticon {
      color: #f6e5a3;
      margin-right: 16upx;
    }
  }
  .e-b {
    color: #d8cba9;
    margin-top: 10upx;
  }
}
</style>
